package com.ggk911.pharmacy_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ggk911.pharmacy_system.entity.DrugPrice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

/**
 * @author ggk-911
 * @version 1.0 2023/4/11 17:27
 */
@Repository
public interface DrugPriceMapper extends BaseMapper<DrugPrice> {
    /**
     * selectById
     *
     * @param id
     * @return
     */
    DrugPrice selectByDrugInfoId(Integer id);

    /**
     * updateByDrugInfoId
     *
     * @param drugInfoId
     * @param drugPrice
     * @return
     */
    boolean updateByDrugInfoId(@Param("drugInfoId") Integer drugInfoId, @Param("drugPrice") Double drugPrice);

    /**
     * deleteByDrugInfoId
     * @param id
     * @return
     */
    boolean deleteByDrugInfoId(Integer id);

    /**
     * listAd
     */
    List<DrugPrice> listAd();
}
